package com.opennetexam.manager.itemmodel;

import com.openexam.openqti.openqtipaperquestion.OpenItemResult;
import com.opennetexam.manager.dto.AnswerModelWithCorr;
import com.opennetexam.manager.dto.ItemTemplate;

import java.util.List;

/**
 * @author 奶茶
 * Created by on 2017/12/13.
 */
public abstract class IHtmlCreater {

    /**
     * 非组合题作答变量标识
     */
    public String Response = "RESPONSE";

    /**
     * 组合体作答变量标识
     */
    public static String RESPONSE_ = "RESPONSE_";

    public abstract OpenItemResult save(ItemTemplate template);

    /**
     * 获取预览试卷方法
     * @param isShowAnswer 是否显示正确答案
     * @return html类型的字符串
     */
    public abstract String getPreview(Boolean isShowAnswer);

    /**
     * 获取作答结果
     * @param openItemResult
     * @return
     */
    public abstract List<String> getItemResult(OpenItemResult openItemResult);

    public abstract double judeScore(AnswerModelWithCorr answerModel);
}
